package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchDataReportRecordsMapper;
import com.ruoyi.system.domain.DispatchDataReportRecords;
import com.ruoyi.system.service.IDispatchDataReportRecordsService;

/**
 * 数据填报记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchDataReportRecordsServiceImpl implements IDispatchDataReportRecordsService 
{
    @Autowired
    private DispatchDataReportRecordsMapper dispatchDataReportRecordsMapper;

    /**
     * 查询数据填报记录
     * 
     * @param dataReportRecordsId 数据填报记录主键
     * @return 数据填报记录
     */
    @Override
    public DispatchDataReportRecords selectDispatchDataReportRecordsByDataReportRecordsId(Long dataReportRecordsId)
    {
        return dispatchDataReportRecordsMapper.selectDispatchDataReportRecordsByDataReportRecordsId(dataReportRecordsId);
    }

    /**
     * 查询数据填报记录列表
     * 
     * @param dispatchDataReportRecords 数据填报记录
     * @return 数据填报记录
     */
    @Override
    public List<DispatchDataReportRecords> selectDispatchDataReportRecordsList(DispatchDataReportRecords dispatchDataReportRecords)
    {
        return dispatchDataReportRecordsMapper.selectDispatchDataReportRecordsList(dispatchDataReportRecords);
    }

    /**
     * 新增数据填报记录
     * 
     * @param dispatchDataReportRecords 数据填报记录
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchDataReportRecords(DispatchDataReportRecords dispatchDataReportRecords)
    {
        return dispatchDataReportRecordsMapper.insertDispatchDataReportRecords(dispatchDataReportRecords);
    }

    /**
     * 修改数据填报记录
     * 
     * @param dispatchDataReportRecords 数据填报记录
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchDataReportRecords(DispatchDataReportRecords dispatchDataReportRecords)
    {
        return dispatchDataReportRecordsMapper.updateDispatchDataReportRecords(dispatchDataReportRecords);
    }

    /**
     * 批量删除数据填报记录
     * 
     * @param dataReportRecordsIds 需要删除的数据填报记录主键
     * @return 结果
     */
    @Override
    public int deleteDispatchDataReportRecordsByDataReportRecordsIds(Long[] dataReportRecordsIds)
    {
        return dispatchDataReportRecordsMapper.deleteDispatchDataReportRecordsByDataReportRecordsIds(dataReportRecordsIds);
    }

    /**
     * 删除数据填报记录信息
     * 
     * @param dataReportRecordsId 数据填报记录主键
     * @return 结果
     */
    @Override
    public int deleteDispatchDataReportRecordsByDataReportRecordsId(Long dataReportRecordsId)
    {
        return dispatchDataReportRecordsMapper.deleteDispatchDataReportRecordsByDataReportRecordsId(dataReportRecordsId);
    }
}
